#include <stdio.h>
#include <stdlib.h>

int func(int * item, int len, int kk);

int main()
{
    int a[] = {1,2,3,44,55,44,55,1,2,3};
    func(a, sizeof(a)/sizeof(int), 2);
    return 0;
}

int funcllh(int *item, int len, int kk)
{

}
int func(int * item, int len, int kk)
{
    int (*info)[3] ;
    int i,j,k,n, get;
    info = (int(*)[3]) malloc(sizeof(int [3]) * len);
    info[0][0] = item[0];
    info[0][1] = 0;
    info[0][2] = 0;
    n = 0;
    for( i = 1; i < len; i++)
    {
            get = 0;
            for(k = 0; k <= n; k++)
            {
                if(info[k][0] == item[i])
                {
                    info[k][2] = i;
                    get = 1;
                    break;
                }
            }
            if(get != 1)
            {
                info[k][0] = item[i];
                info[k][1] = i;
                info[k][2] = i;
                n = n+1;
            }

    }

    for(i = 0; i < n; i++)
    {
        printf("%d %d %d \r\n",info[i][0],info[i][1],info[i][2]);
    }
}
